<?php
namespace app\modules\frontend\models;
use common\component\tool\Tool;
use app\models\Basic;

use Yii;
use yii\helpers\Html;

class ContentAttrRelationships extends Basic
{
    
    public static function tableName()
    {
        return '{{%content_attr_relationships}}';
    }

    /*关联查询 字段名*/
    public function getAttrName()
    {
        $name = $this->hasOne(ContentCategoryAttr::className(), ['attr_id' => 'attr_id'])->select(['{{%content_category_attr}}.attr_id', 'attr_name', 'attr_type', 'attr_value', 'limit', 'default_val']);
        return $name;
    }

    
}